package com.info.zhiduoduo.admin.controller;

import com.info.zhiduoduo.admin.service.PaymentService;
import com.info.zhiduoduo.common.constants.SmartResult;
import com.info.zhiduoduo.common.formbean.BaseSimpleFormBean;
import com.info.zhiduoduo.repository.dto.pay.PaymentChild;
import com.info.zhiduoduo.repository.entity.pay.Payment;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author tianyonghong
 */
@Api(tags = "支付配置接口")
@RestController
@RequestMapping("/payment")
public class PaymentController {

    @Resource
    private PaymentService paymentService;

    @PostMapping("/getList")
    @ApiOperation("获取支付列表")
    private SmartResult<PaymentChild> getList(@RequestBody BaseSimpleFormBean<Payment> formBean) {
        return SmartResult.success(paymentService.getPaymentList(formBean.getReqdata()));
    }

}
